package btcdemo.btcdemo.model;

/**
 * 交易输出
 * 
 * @author blues
 *
 */
public class TransactionOutput {

	/**
	 * 交易输出金额
	 */
	private int value;
	/**
	 * 交易 接收方的 钱包地址
	 */
	private String receiveAddress;

	private String receivePublicKey;


	public TransactionOutput(int value, String receivePublicKey) {
		this.value = value;
		this.receiveAddress = Wallet.getAddressByPublicKey(receivePublicKey);
		this.receivePublicKey = receivePublicKey;
	}


	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getReceiveAddress() {
		return receiveAddress;
	}

	public void setReceiveAddress(String receiveAddress) {
		this.receiveAddress = receiveAddress;
	}


	public String getReceivePublicKey() {
		return receivePublicKey;
	}

	public void setReceivePublicKey(String receivePublicKey) {
		this.receivePublicKey = receivePublicKey;
		this.receiveAddress = Wallet.getAddressByPublicKey(receivePublicKey);
	}
}
